package br.siseventos.model;
// Generated 29/10/2012 23:23:36 by Hibernate Tools 3.2.1.GA


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * TaPermissaoServico generated by hbm2java
 */
@Entity
@Table(name="ta_permissao_servico"
    ,catalog="SisEventosDB"
    , uniqueConstraints = @UniqueConstraint(columnNames={"cod_servico", "cod_perfil"}) 
)
public class TaPermissaoServico extends BaseModel {


     private Integer idtPermissaoServico;
     private TdPerfil tdPerfil;
     private TbServico tbServico;

    public TaPermissaoServico() {
    }

    public TaPermissaoServico(TdPerfil tdPerfil, TbServico tbServico) {
       this.tdPerfil = tdPerfil;
       this.tbServico = tbServico;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="idt_permissao_servico", unique=true, nullable=false)
    public Integer getIdtPermissaoServico() {
        return this.idtPermissaoServico;
    }
    
    public void setIdtPermissaoServico(Integer idtPermissaoServico) {
        this.idtPermissaoServico = idtPermissaoServico;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="cod_perfil", nullable=false)
    public TdPerfil getTdPerfil() {
        return this.tdPerfil;
    }
    
    public void setTdPerfil(TdPerfil tdPerfil) {
        this.tdPerfil = tdPerfil;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="cod_servico", nullable=false)
    public TbServico getTbServico() {
        return this.tbServico;
    }
    
    public void setTbServico(TbServico tbServico) {
        this.tbServico = tbServico;
    }




}


